package com.cx.service.impl;

import com.cx.mapper.UsersMapper;
import com.cx.pojo.Users;
import com.cx.service.RegisterService;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RegisterServiceImpl implements RegisterService {
    @Autowired
    private UsersMapper usersMapper;
    @Override
    public int insertUser(Users users) {
        int affectedRows=usersMapper.insert(users);
        return affectedRows;
    }

    @Override
    public Users isExist(String username) {

        return usersMapper.selectByName(username);
    }
}
